package cn.itsource.system.controller;

import cn.itsource.base.util.AjaxResult;
import cn.itsource.system.domain.dto.PhoneUserFormRegisterDto;
import cn.itsource.system.service.IRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("/register")
public class RegisterController {
    @Autowired
    private IRegisterService registerService;
    @PostMapping("/userRegister")
    public AjaxResult userRegister(@Valid @RequestBody PhoneUserFormRegisterDto registerDto){
        return registerService.userRegister(registerDto);
    }
}
